
<div>
<br/>
<ol class="breadcrumb">
<li class="active"><span class="glyphicon glyphicon-home" style="color:#23527c"></span>&nbsp;<mainpage></mainpage></li>
<li class="active">运维工作台 / 参数配置管理 / 接口参数管理 / 错误码管理</li>
</ol>

<ul class="nav nav-tabs marT15">
      <li role="presentation" ><a href="#/errorCodemManagement" style="color: #555;">错误码管理</a></li>
      <li role="presentation" class="active"><a href="#/errorCodeImport" style="color:#555;">错误码导入</a></li>
      <li role="presentation"><a href="#/errorCodeImportDetail" style="color: #555;">错误码导入明细</a></li>
</ul> 

<div class="rightbar"> 
<div id="serviceEnd" class="showEle sign1">
    <form action="uploadFile/out-excel" method="post" id="form" name="myform">
    	<input name="fileType" type="text" value="错误码" style="display: none;" />
      <div class="left marT15 marR10">
           
                <span class="search-name">文件名</span>
                <input type="text" class="form-control1" placeholder="" 
                ng-keyup='search($event)'
                ng-model="searchData.fileName" name="fileName">
         
      </div>
      <div class="left marT15 marR10">          
                <span class="search-name">导入人</span>
                <input type="text" class="form-control1" placeholder="" 
                ng-keyup='search($event)'
                ng-model="searchData.userName" name="userName">
      </div>
     <div class="left marT15 marR10">
     	<span class="search-name">状态</span>
       <select class="form-control1" ng-model="searchData.auditStatus" name="auditStatus">
            <option value="">全部</option>
            <option value="0">待审核</option>
            <option value="1">审核通过</option>
            <option value="2">审核不通过</option>
        </select>
    </div>
    </form>
       <a href="javascript:;" class=" btn btn-sm btn-primary left marT15 marR10" id="search" ng-click='search()'><span class="glyphicon glyphicon-search"></span></a>
       <input type="button" data-toggle="modal" data-target="#import" class="btn btn-sm btn-primary left marT15" value="文件导入" ng-click="qix()">
        <div class="right marT15" style="position:relative">
            <button class="btn btn-sm btn-primary" ng-click='outExcel()'><img style="width:25px; height:20px;" src="img/excel.png">导出表格<span ng-style='loadStyle' class="outExcelLoad"><img  src="img/load.gif"></span>
            </button>
        </div>
        </div>


     <div class="table-box">

        <table class="table table-bordered table-striped text-center bg-info marT15">
            <thead >
            <tr class="info">
              <th class="text-center">序号</th>
              <th class="text-center">日期</th>
              <th class="text-center">导入文件名</th>
              <th class="text-center">文件类型</th>
              <th class="text-center">文件格式</th>
              <th class="text-center">导入成功记录</th>
              <th class="text-center">导入失败记录</th>
              <th class="text-center">导入操作人</th>
              <th class="text-center">操作时间</th>
              <th class="text-center">状态</th>
              <th class="text-center">操作</th>
            </tr>
            </thead>
            <tbody id="appList">
              <tr ng-repeat="Item in result">
                    <td>{{ $index+1 }}</td>
                    <td class="w115">{{Item.uptimeDate}}</td>                                        
                    <td class="w115">{{Item.fileName}}</td>
                    <td class="w85">{{Item.fileType}}</td>
                    <td class="w85">{{Item.fileFormat}}</td>  
                    <td class="w115">{{Item.okLines}}</td>
                    <td class="w115">{{Item.failLines}}</td>
                    <td class="w115">{{Item.userName}}</td>
                    <td style="min-width: 200px">{{Item.uptime}}</td>
                    <td class='w115'>
                       <span ng-if='"0"==Item.auditStatus' >待审核</span>
                       <span ng-if='"1"==Item.auditStatus' >审核通过</span>
                       <span ng-if='"2"==Item.auditStatus' >审核不通过</span>
                     </td>
                    <td>
                        <a ng-click="changeStstus($index,Item.fileId)"  class="" data-toggle="modal" data-target="#audit" ng-show='Item.auditStatus!="1"'>审核</a>
                        <span ng-show='Item.auditStatus=="1"'>已审核</span>
                    </td>
              </tr>
            </tbody>
        </table>
    </div>

         <page></page>
</div>                     
</div>
<!-- 文件导入程序弹框 -->
<div class="modal fade" id="import" tabindex="-1" role="dialog" aria-labelledby="import">
    <div class="modal-dialog" role="document">
        <div class="modal-content" style="width:620px">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" >错误码导入</h4>
            </div>
            <div class="modal-body">
           <div class="row marB15"> 
               <div class="col-xs-6">
                <label class="left"><span>文件类型</span></label>
                    <select class="form-control line4 right" id="txtcsvxls" >
                        <option value="txt">txt</option>
                        <option value="csv">csv</option>
                        <option value="xlsx">xlsx</option>
                    </select>
                </div>
               <div class="col-xs-6">
                   <label class="left">文件内容格式：来源类型(英文)|错误码类型|错误码|对应短信平台错误码|错误码描述</span></label>
               </span>
                </div>
           </div>
            <div class="row marB15"> 
               	<form name="form_upload" id="uploadForm" method="post" enctype="multipart/form-data">
               	<span class="col-xs-6">
                  <input name="file" type="file" id="file" />
                  <input name="fileType" type="text" value="错误码" style="display: none;" />
                </span>
                 <span class="col-xs-6">
                   <label class="left"><span>说明：上传文件无文件头，每行一条记录。</span></label>
                </span>
                 <div id="" class="modal-footer right">
          	      <a  class="btn btn-primary" id="uploadBtn" ng-click="daoru()">上传</a>
                  </div>
                </form>
                   <!--<label class="left"><span>选择上传的文件</span></label>
                    <input type="file" class="form-control line4 right" ng-model="data.loginSvrUser"/>-->
              
              
           </div>
        </div>
         <!--<form name="form_upload" id="uploadForm" method="post" enctype="multipart/form-data">
          <input name="file" type="file" id="file" />
          <input name="fileType" type="text" value="错误码" style="display: none;" />
          <div id="" class="modal-footer">
          	<input type="button" value="Upload" id="uploadBtn" />
          </div>
        </form>-->
        <!--<div class="modal-footer">
            <button type="button" class="btn btn-default btn-sm" data-dismiss="modal">取消</button>
            <button type="button" class="btn btn-primary btn-sm" ng-click="upload()">上传</button>
        </div>-->
        </div>
    </div>
</div>

<!-- 审核 -->
<div class="modal fade" id="audit" tabindex="-1" role="dialog" aria-labelledby="audit">
    <div class="modal-dialog" role="document">
        <div class="modal-content" style="width:620px">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" >审核</h4>
            </div>
            <div class="modal-body">
           <div class="row marB15"> 
               <div class="col-xs-12">
                <label class="left"><span>审核结果</span></label>
                    <select class="form-control" ng-model="sendData.auditStatus">
                        <option value="0">待审核</option>
                        <option value="1">审核通过</option>
                        <option value="2">审核不通过</option>
                    </select>
                </div>
           </div>
        </div>
        <div class="modal-footer">
            <button type="button" class="btn btn-default btn-sm" data-dismiss="modal">取消</button>
            <button type="button" class="btn btn-primary btn-sm" ng-click="sendAjax()">审核</button>
        </div>
        </div>
    </div>
</div>
<!--修改程序结束-->

<!-- 加载提示框 -->
<div id="statusTip" ng-style='statusLoad'>
    <div id="statusBox">
     <img src="img/load.gif" style="width:50px; height:50px; position: relative; left:55px; margin-bottom: 15px;"><p style="color: #fff;">正在{{loadStatus}}，请稍候....</p>
    </div>
</div>
<!-- 加载框 -->
  <span class='loaded' ng-show='loaded'><img  src="img/load.gif"></span>
<!-- 加载框 完成-->